<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'member-index', //页面标示
    'pagename' => '用户列表', //当前页面名称
    'mycss' => array(), //加载的css样式表
    'myjs' => array(), //加载的js脚本
	'footerjs'=>array('content/jquery.smoothConfirm'),
    'head' => true, //加载头部文件
);
include getTpl('header', 'public');
?>
<!--顶部导航 开始-->
<?php include getTpl('top', 'public');?>
<!--顶部导航 结束-->
<!--左侧菜单 开始-->
<?php include getTpl('nav', 'public');?>
<!--左侧菜单 结束-->
<!--主体 开始-->
<!-- content -->
<section id="content" class="main-section">
<!-- main padder --> 
<section class="main padder">
<div class="clearfix"> 
<h4><i class="fa fa-table"></i><?php echo trim($Document['pagename'],'_');?></h4> 
</div>
<div class="row">
<!-- table 11 -->
<div class="col-lg-12"> 
<section class="panel">
<!---->
<div class="panel-body">
  <div class="row text-small">
    <div class="col-sm-8">
        <div class="btn-group">
           <a class="btn btn-default" href="<?php echo U('service/member',array('all'=>1));?>">全部</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('status'=>2));?>">正常</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('status'=>1));?>">无效</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('status'=>3));?>">冻结</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('status'=>4));?>">取消关注</a>
        </div>
        <div class="btn-group">
           <a class="btn btn-default" href="<?php echo U('service/member',array('source'=>1));?>">主动关注</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('source'=>2));?>">二维码扫描</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('source'=>3));?>">网站二维码</a>
           <a class="btn btn-default" href="<?php echo U('service/member',array('source'=>4));?>">地推</a>
        </div>
    </div>
    <div class="col-sm-4">
      <form action="<?php echo U(ACTION_NAME.'/member');?>" method="get" name="form1" target="_self">
        <div class="input-group">
          <input type="text" name="q" class="input-sm form-control" placeholder="请输入搜索关键字..." />
          <input name="g" type="hidden" value="<?php echo GROUP_NAME;?>" />
          <input name="c" type="hidden" value="<?php echo ACTION_NAME;?>" />
          <input name="m" type="hidden" value="<?php echo MODEL_NAME;?>" />
          <div class="input-group-btn">
           <button data-toggle="dropdown" class="btn btn-white btn-sm dropdown-toggle">
           <span class="dropdown-label">用户名</span><span class="caret"></span></button>
           <ul class="dropdown-menu dropdown-select pull-right">
           <li class="active"><a href="#"><input type="radio" checked="checked" name="st" value="name">用户名</a></li>
            <li class=""><a href="#"><input type="radio" name="st" value="uid">UID</a></li>
            <li class=""><a href="#"><input type="radio" name="st" value="phone">手机号</a></li>
           </ul> 
          </div>
          <span class="input-group-btn">
          <button class="btn btn-sm btn-white" type="submit">搜索</button>
          </span> </div>
      </form>
    </div>
  </div>
</div>
<!---->
<div class="table-responsive"> 
<table class="table table-striped b-t text-small"> 
<thead>
  <tr>
    <th align="center">UID</th>
    <th align="center">来源</th>
    <th align="center">姓名</th>
    <th align="center">昵称</th>
    <th align="center">手机</th>
    <th align="center">小区</th>
    <th align="center">活动积分</th>
    <th align="center">消费积分</th>
    <th align="center">邀请人</th>
    <th align="center">认证</th>
    <th align="center">注册时间</th>
    <th align="center">最后登录</th>
    <th align="center">状态</th>
    <th align="center" width="100">操作</th>
  </tr>
</thead>
<tbody>
<?php
if ($rs){
    foreach($rs as $val){
?>
<tr id="list_detail_<?php echo $val['uid'];?>">
    <td><?php echo $val['uid'];?></td>
    <td><?php echo $regType[$val['source_id']];?></td>
    <td><?php echo $val['username'];?></td>
    <td><?php echo $val['nickname'];?></td>
    <td><?php echo $val['phone'];?></td>
    <td><a href="<?php echo U('service/index',array('village_id'=>$val['village_id']));?>"><?php echo $val['village_name'];?></a></td>
    <td><?php echo $val['event_credit'];?></td>
    <td><?php echo $val['shopping_credit'];?></td>
    <td><?php echo $val['invite_uid']?'<a href="'.U('service/index',array('invite'=>$val['invite_uid'])).'">'.getUser($val['invite_uid']).'</a>':'';?></td>
    <td><?php echo $auth[$val['is_auth']];?></td>
    <td><?php echo ($val['reg_time']?outTime($val['reg_time']):'');?></td>
     <td><?php echo ($val['last_login_time']?outTime($val['last_login_time']):'');?></td>
    <td id="set_user_id_<?php echo $val['uid'];?>"><?php echo $status[$val['status']];?></td>
    <td>
    <div class="btn-group"> 
      <button class="btn btn-white btn-xs dropdown-toggle" data-toggle="dropdown">操作<span class="caret"></span></button> 
      <ul class="dropdown-menu">
          <li><a rel="pop" href="<?php echo U('member/detail',array('uid'=>$val['uid']));?>">详细信息</a></li>
          <li><a href="<?php echo U('service/index',array('uid'=>$val['uid']));?>" class="edit">消息日志</a></li>
           <li><a href="<?php echo U('member/count',array('uid'=>$val['uid']));?>" rel="pop">统计数据</a></li>
           <li class="divider"></li>
          <li class="dropdown-submenu pull-left"><a href="#" tabindex="-1">积分操作</a> 
               <ul aria-labelledby="dropdownMenu" role="menu" class="dropdown-menu"> 
                <li><a href="<?php echo U('credit/add',array('uid'=>$val['uid']));?>" rel="pop" tabindex="-1">增减积分</a></li> 
                <li><a href="<?php echo U('credit/index',array('uid'=>$val['uid']));?>" rel="pop" tabindex="-1">积分日志</a></li>
                <li><a href="<?php echo U('credit/index',array('uid'=>$val['uid'],'type'=>'shopping'));?>" rel="pop" tabindex="-1">结邻币日志</a></li>
               </ul>
           </li>
           <li class="divider"></li>
           <li><a rel="pop" href="<?php echo U('service/msg',array('uid'=>$val['uid']));?>">发送消息</a></li>
      </ul> 
  </div>
    </td>
  </tr>
  <?php
    }
}else{
  ?>
 <tr>
    <td colspan="20" align="center">暂无数据</td>
  </tr>
<?php
}
?>
</tbody>
</table> 
</div> 
<footer class="panel-footer"> 
<div class="row"> 
<div class="col-sm-12 text-right text-center-sm"> 
      <?php echo page($total,$p,'',20,'p');?>
</div> 
</div> 
</footer>
</section> 
</div> 
<!--/ table 11 -->
</div> 
</section>
<!--/ main padder -->  
</section> 
<!--/ content --> 
<!--主体 结束-->
<script>
$(function(){	
})
</script>
<?php
include getTpl('footer', 'public');
?>